<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                template="/templates/ui.xhtml">

    <ui:define name="head">
    </ui:define>

    <ui:define name="content">
        <div class="entry" id="top">
            <h:form id="form">
                <div style="margin-top: 20px;">
                    <p:tabView dynamic="true" cache="false" style="font-weight:normal;font-style:normal">
                        <p:tab title="报表处理">
                            <p:messages id="msgs" showDetail="true"/>
                            <h:panelGrid columns="2" cellspacing="10">
                                <h:outputLabel value="报表日期:" style="font-weight: bold;" for="startdate"/>
                                <p:inputText id="startdate" required="true" requiredMessage="日期不能为空."
                                             value="#{pbcRateRptAction.startdate}"
                                             onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
                            </h:panelGrid>
                            <p:ajaxStatus style="height:20px;text-align:center">
                                <f:facet name="start">
                                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                                </f:facet>
                                <f:facet name="complete">
                                    <h:outputText value=""/>
                                </f:facet>
                            </p:ajaxStatus>
                            <p:separator/>
                            <h:panelGrid columns="2" style="margin-bottom:5px" cellpadding="10">
                                <h:outputText style="font-weight: bold;" value="处理选项: "/>
                                <p:selectManyCheckbox value="#{pbcRateRptAction.selectedOptions}"
                                                      layout="pageDirection">
                                    <f:selectItems value="#{pbcRateRptAction.options}"/>
                                </p:selectManyCheckbox>
                            </h:panelGrid>
                            <h:panelGrid columns="1" columnClasses="exportbutton" style="margin-bottom:5px">
                                <h:panelGroup>
                                    <p:commandButton value="报表基础数据处理" image="ui-icon-disk" ajax="true"
                                                     action="#{pbcRateRptAction.onETLData}" update="msgs" />
                                </h:panelGroup>
                            </h:panelGrid>
                            <p:separator/>
                            <h:panelGrid columns="1" columnClasses="exportbutton">
                                <h:panelGroup>
                                    <p:commandButton value="导出利率水平报表-校验表" image="ui-icon-disk" ajax="false"
                                                     actionListener="#{pbcRateRptAction.onExportXls_Check}"/>
                                    <p:commandButton value="生成4个报文文件" image="ui-icon-disk" ajax="true"
                                                     action="#{pbcRateRptAction.onExportTxt1}" update="msgs"/>
                                </h:panelGroup>
                            </h:panelGrid>
                            <h:panelGrid columns="1" columnClasses="exportbutton">
                                <h:panelGroup>
                                    <p:commandButton value="生成贷款余额报文文件" image="ui-icon-disk" ajax="true"
                                                     action="#{pbcRateRptAction.onExportTxtC01Y}" update="msgs"/>
                                    <p:commandButton value="生成贷款发生额报文文件" image="ui-icon-disk" ajax="true"
                                                     action="#{pbcRateRptAction.onExportTxtC01F}" update="msgs"/>
                                    <p:commandButton value="生成存款余额报文文件" image="ui-icon-disk" ajax="true"
                                                     action="#{pbcRateRptAction.onExportTxtC02Y}" update="msgs"/>
                                    <p:commandButton value="生成存款发生额报文文件" image="ui-icon-disk" ajax="true"
                                                     action="#{pbcRateRptAction.onExportTxtC02F}" update="msgs"/>
                                </h:panelGroup>
                            </h:panelGrid>
                        </p:tab>
                    </p:tabView>
                </div>

            </h:form>
        </div>
    </ui:define>

</ui:composition>